Many database structures rely upon Structured Query Language (SQL) as the standard approach to define, read, and manipulate data within a database. The database can include constraints and triggers to specify rules to maintain the integrity and consistency of the database. A constraint defines rules that the database must comply with. The constraint can be applied to a column, table, multiple tables, or an entire database schema.
A trigger is code that is automatically executed in response to an event for the purpose of maintaining the integrity of data on the database. For example, when a new record is added to an employees' table, a new record should also be added in the salaries table for the new employee. The constraints and triggers can be defined in the SQL and are executed when data is modified on a database table. However, not all application developers are proficient in SQL. Furthermore even if a developer is proficient in SQL, some constraints are complex and difficult to represent in SQL. Thus, there is a need for improved techniques to define constraints.